<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script>
		var arr=[1,2,3,4,5];
		var a = 2;
		arr.forEach(function(v,i){
			// console.log(v);
			// console.log(i);
			if(a==v){
				console.log(i);
				// alert("找到了");
				return;
			}
		});
	</script>
</body>
</html>
